<?php
/**
* @author		Arunoda Susiripala
* @package		jconnect
* @copyright	Arunoda Susiripala
* @license 		http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
*/
include_once 'init.php';

if($_REQUEST['setup']){
	setMeta('appName',$_REQUEST['appName']);
	setMeta('secret_key',$_REQUEST['secret']);
	setMeta('joomla_host',$_REQUEST['joomla_host']);
	setMeta('joomla_path',$_REQUEST['joomla_path']);
	setMeta('joomla_port',$_REQUEST['joomla_port']);
}
?>

<html>
	<head>
		<a href="index.php">Home</a><br></br>
		<form method='post'>
			<table>
				<tr>
					<td>Secret Key</td>
					<td><input type="text" name="secret" size="30" value='<?php echo getMeta('secret_key');?>'/></td>
				</tr>
				<tr>
					<td colspan='2' ><hr></hr></td>
				</tr>
				<tr>
					<td>AppName</td>
					<td><input type="text" name="appName" size="15" value='<?php echo getMeta('appName');?>' /></td>
				</tr>
				<tr>
					<td>Joomla Host</td>
					<td><input type="text" name="joomla_host" value='<?php echo getMeta('joomla_host');?>'/></td>
				</tr>
				<tr>
					<td>Joomla Path</td>
					<td><input type="text" name="joomla_path" size="60" value='<?php echo getMeta('joomla_path');?>'/></td>
				</tr>
				<tr>
					<td>Joomla Port</td>
					<td><input type="text" name="joomla_port" value='<?php echo getMeta('joomla_port');?>'/></td>
				</tr>
				<tr>
					<td colspan='2'><input type='submit' name='setup' value="Set Up"/></td>
				</tr>
			</table>
		</form>
	</head>
</html>